package com.mpgame;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import com.mpgame.common.utils.Log;
import com.mpgame.database.redis.manager.RedisMgr;

@SpringBootApplication
public class VerifyServer
{
    public static void main( String[] args )
    {
        try{
            RedisMgr.getInstance().init();

            SpringApplication.run(VerifyServer.class, args);
        }
        catch(Exception e){
            Log.err("服务器启动失败: " + e.getMessage());
        }
        finally{
            Runtime.getRuntime().addShutdownHook(new Thread(() -> {
                Log.info("正在关闭服务器...");
                Log.info("服务器已关闭");
            }));
        }
    }
}
